﻿namespace AntQuartzUI.Attributes;

/// <summary>
/// 添加触发器，必须实现IJob接口
/// </summary>
[AttributeUsage(AttributeTargets.Class,Inherited = false)]
public class QuartzTriggerAttribute : Attribute
{
    /// <summary>
    /// Job名称，默认为类名
    /// </summary>
    public string JobName { get; set; } = string.Empty;
    
    /// <summary>
    /// Job组名称，默认为类名+ group
    /// </summary>
    public string JobGroupName { get; set; } = string.Empty;
    
    /// <summary>
    /// Cron 表达式定时任务
    /// </summary>
    public string Cron { get; set; } = string.Empty;

    public int Second { get; set; }
    
    public int Minutes { get; set; }
    
    public int Hours { get; set; }
    
    /// <summary>
    /// 是否重复执行
    /// </summary>
    public bool RepeatForever { get; set; }

    /// <summary>
    /// 描述
    /// </summary>
    public string Describe { get; set; } = string.Empty;
}